package com.xgr.wonderful.entity;

import java.io.Serializable;
import com.xgr.wonderful.entity.User;


public class Comment implements Serializable {
	
	private Integer id; //评论的自增id 
	private Integer articleid; //状态id
	private Integer toid;  //被回复的回复的id
	private Integer userid;
	private String content;
	private Double x;
	private Double y;
	private Long time;
	private Integer latest;
	private Integer pagesize;

	private User user;

	public Integer getId() {
		return id;
	}
	
	public User getUser() {
		return user;
	}

	public Long getTime() {
		return time;
	}

	public String getContent() {
		return content;
	}
	
	public Integer getArticleid() {
		return articleid;
	}

	/**
	 *用于查询comment 
	 * @param statusid  状态id
	 * @param latestCommentId 当前已经加载的最新评论id，默认为0。用于返回未加载的新评论。
	 * @param pagesize  一次查询条数，默认无，查询所有评论
	 */
	public Comment(Integer statusID, Integer latestCommentID,
			Integer pageSize) {
		this.articleid = statusID;
		this.latest = latestCommentID;
		this.pagesize = pageSize;
	}

	/**
	 * 发表评论时使用的构造函数
	 * @param statusid  状态id
	 * @param userid  发表评论的用户的id 
	 * @param toid  表示这条评论是回复 id的回复 ， 可以不填
	 * @param content
	 * @param lat  可以不填
	 * @param lng  可以不填
	 * @param latest 当前已经加载的最新评论id，默认为0。用于返回未加载的新评论
	 */
	public Comment(Integer statusID, Integer userID, Integer toCommentID,
			String commentContent, Double lat, Double lng,
			Integer lastestCommentID) {
		this.articleid = statusID;
		this.userid = userID;
		this.toid = toCommentID;
		this.content = commentContent;
		this.x = lat;
		this.y = lng;
		this.latest = lastestCommentID;
	}

}
